Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ChibiOS: Support formatting of microSD card #19182

Merged
merged 4 commits into from
Dec 28, 2021

Conversation

tridge
Copy link
Contributor

@tridge tridge commented Nov 7, 2021

This supports formatting of the microSD card on ChibiOS. The card is then automatically remounted.
This only works on SDC sdcard interfaces (so not on MMC SPI interfaces) as the GET_BLOCK_SIZE ioctl() only works on SDC
MAVProxy implementation here: ArduPilot/MAVProxy#961
using command "formatsdcard"
cost is about 5k on boards where this is enabled

Copy link
Collaborator

@davidbuzz davidbuzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this something that might want an autotest?

@robustini
Copy link
Contributor

Thanks @tridge, this is very useful in some cases!

@tridge
Copy link
Contributor Author

tridge commented Nov 8, 2021

notes from call:

  • make disarmed only
  • check impact on terrain db
  • check impact on lua script loop
  • use current FS size for MMC sdcard?
  • bisection search for size?

@tridge tridge force-pushed the pr-format-sdcard branch 2 times, most recently from bd6284a to 708337f Compare December 27, 2021 22:00
@tridge
Copy link
Contributor Author

tridge commented Dec 27, 2021

changed to only allow format when disarmed, and only enable on boards with SDMMC interface
checked impact on terrain data, and result is that when you format it does not re-create terrain directory, so you need to reboot after formatting to recreate terrain data, which I think is fine

Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works on CubeOrange.

Documentation will be important as it won't be available on many flight controllers.

@peterbarker peterbarker merged commit 7c57e15 into ArduPilot:master Dec 28, 2021
@tridge tridge added the WikiNeeded needs wiki update label Jan 4, 2022
@Hwurzburg Hwurzburg removed the WikiNeeded needs wiki update label Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants